home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.mactech.com 2010
/
ftp.mactech.com.tar
/
ftp.mactech.com
/
machack
/
Hacks97
/
KlingonBGApp.sit
/
Klingon BG App
/
Source
/
mainUtil.c
< prev
next >
Wrap
Text File
|
1997-06-28
|
1KB
|
68 lines
// Source code for Klingon Clock. Copyright (C) 1996-1997
// Charles H. Hemstreet IV
//
// Started at MacHack 1996
// Completed at MacHack 1997
//
// Best thanks to:
// My wife Regie, son Chad and baby
// Other thanks to Elden Wood and Bob Clark
//
// This code is distributed "as-is" and implies no warranty or guarantee.
#ifndef __MAINUTIL__
#include "mainUtil.h"
#endif
void gestaltChecks(void)
{
OSErr initAppErr;
long gestaltAnswer;
initAppErr = Gestalt(gestaltVersion, &gestaltAnswer);
assert(initAppErr == noErr);
if (initAppErr)
{
SysBeep(1);
ExitToShell();
// This program must run on a machine that is new enough to support the gestalt manager.
}
initAppErr = Gestalt(gestaltSystemVersion, &gestaltAnswer);
assert(initAppErr == noErr);
if (initAppErr)
{
SysBeep(1);
ExitToShell();
}
if (gestaltAnswer < 0x0700)
{
SysBeep(1);
ExitToShell();
// This program requires System 7.0 or higher to run",0,false,false,true);
}
}
OSErr DoAllPeriodicProcessing(void)
{
short MySndID[kMaxArray];
short MySndID1[kMaxArray];
short MySndID2[kMaxArray];
short cur_time[kMaxArray];
OSErr myErr = noErr;
getTime(cur_time);
myErr = makeSentence(cur_time, MySndID, MySndID1, MySndID2);
assert(myErr == noErr);
myErr = speakSentence(MySndID, MySndID1, MySndID2);
assert(myErr == noErr);
return myErr;
}